/**
 * 
 */
package com.ms.service.module.baccarat.dm;

import java.util.ArrayList;

import com.ms.game.lobby.db.LobbyGameListWhileModel;
import com.ms.service.module.baccarat.db.BacrDAO;
import com.xpec.c4.service.module.task.TaskAsyncCommand;

/**
 * 異步處理載入白名單列表
 * 
 * @author TW15010
 */
public class BacrLoadWhiteListAsync extends TaskAsyncCommand {
	/**
	 * 百家樂 doorman module 實體
	 */
	private BacrDmModule srcModule;

	/**
	 * 回傳的白名單列表
	 */
	private ArrayList<LobbyGameListWhileModel> whiteList;

	@Override
	public void asyncExecute() throws Exception {
		whiteList = BacrDAO.loadWhiteList();
	}

	@Override
	public void execute() throws Exception {
		BacrDmProcessor proc = (BacrDmProcessor) srcModule.getBasicprocesser();
		proc.onLoadWhiteLis(whiteList);
	}

	public BacrDmModule getSrcModule() {
		return srcModule;
	}

	public void setSrcModule(BacrDmModule srcModule) {
		this.srcModule = srcModule;
	}
}
